<style>

    .page-title {
        text-align: center;
        margin-bottom: 2.5rem;
        color: var(--dark-text);
    }

    /* 通用模块样式 */
    .content-module {
        background-color: white;
        border-radius: 12px;
        box-shadow: var(--card-shadow);
        padding: 1.5rem;
        margin-bottom: 2rem;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .content-module:hover {
        transform: translateY(-5px);
        box-shadow: var(--hover-shadow);
    }

    .content-module .module-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid #eee;
    }

    .content-module .module-title {
        font-size: 1.3rem;
        font-weight: 600;
        color: var(--primary);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .content-module .module-title i {
        color: var(--secondary);
    }

    .content-module .view-all {
        font-size: 0.9rem;
        color: var(--primary);
        text-decoration: none;
        transition: color 0.2s;
    }

    .content-module .view-all:hover {
        color: var(--secondary);
        text-decoration: underline;
    }

    /* 最新文章模块 */
    .article-item {
        display: flex;
        gap: 1rem;
        padding: 0.75rem 0;
        border-bottom: 1px solid #f1f1f1;
    }

    .article-item:last-child {
        border-bottom: none;
    }

    .article-item .article-img {
        width: 90px;
        height: 60px;
        object-fit: cover;
        border-radius: 6px;
        flex-shrink: 0;
    }

    .article-item .article-info {
        flex-grow: 1;
    }

    .article-item .article-title {
        font-weight: 500;
        margin-bottom: 0.25rem;
        transition: color 0.2s;
    }

    .article-item .article-title:hover {
        color: var(--primary);
    }

    .article-item .article-meta {
        font-size: 0.8rem;
        color: var(--light-text);
        display: flex;
        gap: 1rem;
    }

    /* 热议问答模块 */
    .question-item {
        padding: 0.75rem 0;
        border-bottom: 1px solid #f1f1f1;
    }

    .question-item:last-child {
        border-bottom: none;
    }

    .question-item .question-title {
        font-weight: 500;
        margin-bottom: 0.5rem;
        transition: color 0.2s;
    }

    .question-item .question-title:hover {
        color: var(--primary);
    }

    .question-item .question-stats {
        display: flex;
        gap: 1.5rem;
        font-size: 0.85rem;
        color: var(--light-text);
    }

    .question-item .question-stats span {
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }

    /* 近期活动模块 */
    .event-item {
        display: flex;
        gap: 1rem;
        padding: 0.75rem 0;
        border-bottom: 1px solid #f1f1f1;
    }

    .event-item:last-child {
        border-bottom: none;
    }

    .event-item .event-date {
        width: 60px;
        height: 60px;
        background-color: var(--primary);
        color: white;
        border-radius: 8px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .event-item .event-month {
        font-size: 0.8rem;
        text-transform: uppercase;
    }

    .event-item .event-day {
        font-size: 1.4rem;
        font-weight: 700;
        line-height: 1;
    }

    .event-item .event-info {
        flex-grow: 1;
    }

    .event-item .event-title {
        font-weight: 500;
        margin-bottom: 0.25rem;
    }

    .event-item .event-location {
        font-size: 0.85rem;
        color: var(--light-text);
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }

    /* 热门投票模块 */
    .poll-item {
        padding: 1rem 0;
        border-bottom: 1px solid #f1f1f1;
    }

    .poll-item:last-child {
        border-bottom: none;
    }

    .poll-item .poll-question {
        font-weight: 500;
        margin-bottom: 1rem;
    }

    .poll-item .poll-options {
        margin-bottom: 0.75rem;
    }

    .poll-item .poll-option {
        margin-bottom: 0.75rem;
    }

    .poll-item .poll-option-label {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        cursor: pointer;
    }

    .poll-item .progress-container {
        width: 100%;
        height: 8px;
        background-color: #eee;
        border-radius: 4px;
        overflow: hidden;
        margin-top: 0.25rem;
    }

    .poll-item .progress-bar {
        height: 100%;
        background-color: var(--primary-light);
    }

    .poll-item .poll-votes {
        font-size: 0.8rem;
        color: var(--light-text);
        text-align: right;
    }

    .poll-item .vote-btn {
        background-color: var(--primary);
        color: white;
        border: none;
        padding: 0.35rem 1rem;
        border-radius: 4px;
        font-size: 0.9rem;
        cursor: pointer;
        transition: background-color 0.2s;
    }

    .poll-item .vote-btn:hover {
        background-color: #356382;
    }

    /* 星座速览模块 */
    .horoscope-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 1rem;
    }

    .horoscope-item {
        background-color: var(--light-bg);
        border-radius: 8px;
        padding: 0.75rem;
        text-align: center;
        transition: transform 0.2s, background-color 0.2s;
    }

    .horoscope-item:hover {
        transform: translateY(-3px);
        background-color: var(--primary-light);
    }

    .horoscope-item .horoscope-icon {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
        color: var(--primary);
    }

    .horoscope-item .horoscope-name {
        font-size: 0.9rem;
        font-weight: 500;
        margin-bottom: 0.25rem;
    }

    .horoscope-item .horoscope-rating {
        font-size: 0.8rem;
        display: flex;
        justify-content: center;
        gap: 0.1rem;
    }

    .horoscope-item .rating-star {
        color: #FFD700;
    }

    .horoscope-item .rating-star.empty {
        color: #ddd;
    }

    /* 响应式调整 */
    @media (max-width: 768px) {
        .horoscope-grid {
            grid-template-columns: repeat(3, 1fr);
        }

        .article-item {
            flex-direction: column;
        }

        .article-item .article-img {
            width: 100%;
            height: auto;
        }
    }
</style>

<div class="container">
    <h1 class="page-title">为你推荐</h1>

    <!-- 最新文章模块 -->
    <div class="content-module">
        <div class="module-header">
            <h2 class="module-title"><i class="fas fa-newspaper"></i>最新文章</h2>
            <a href="#" class="view-all">查看全部 <i class="fas fa-angle-right"></i></a>
        </div>

        <div class="articles-list">
            <div class="article-item">
                <img src="https://picsum.photos/id/237/200/150" alt="社交网络使用技巧" class="article-img">
                <div class="article-info">
                    <h3 class="article-title">如何有效管理你的社交网络隐私设置</h3>
                    <div class="article-meta">
                        <span><i class="far fa-user"></i> 社交达人</span>
                        <span><i class="far fa-clock"></i> 2小时前</span>
                        <span><i class="far fa-comment"></i> 32评论</span>
                    </div>
                </div>
            </div>

            <div class="article-item">
                <img src="https://picsum.photos/id/1005/200/150" alt="线上社交技巧" class="article-img">
                <div class="article-info">
                    <h3 class="article-title">提升线上社交质量的7个实用技巧</h3>
                    <div class="article-meta">
                        <span><i class="far fa-user"></i> 人际关系专家</span>
                        <span><i class="far fa-clock"></i> 5小时前</span>
                        <span><i class="far fa-comment"></i> 18评论</span>
                    </div>
                </div>
            </div>

            <div class="article-item">
                <img src="https://picsum.photos/id/1010/200/150" alt="社交趋势分析" class="article-img">
                <div class="article-info">
                    <h3 class="article-title">2023年社交网络发展趋势预测</h3>
                    <div class="article-meta">
                        <span><i class="far fa-user"></i> 科技观察员</span>
                        <span><i class="far fa-clock"></i> 昨天</span>
                        <span><i class="far fa-comment"></i> 45评论</span>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 热议问答模块 -->
    <div class="content-module">
        <div class="module-header">
            <h2 class="module-title"><i class="fas fa-comments"></i>热议问答</h2>
            <a href="#" class="view-all">查看全部 <i class="fas fa-angle-right"></i></a>
        </div>

        <div class="questions-list">
            <div class="question-item">
                <h3 class="question-title">如何在社交网络中建立真实且有价值的人脉关系？</h3>
                <div class="question-stats">
                    <span><i class="far fa-eye"></i> 1.2k 浏览</span>
                    <span><i class="far fa-comment"></i> 42 回答</span>
                    <span><i class="far fa-heart"></i> 89 关注</span>
                </div>
            </div>

            <div class="question-item">
                <h3 class="question-title">社交网络使用时间过长会对心理健康产生哪些影响？</h3>
                <div class="question-stats">
                    <span><i class="far fa-eye"></i> 2.5k 浏览</span>
                    <span><i class="far fa-comment"></i> 76 回答</span>
                    <span><i class="far fa-heart"></i> 156 关注</span>
                </div>
            </div>

            <div class="question-item">
                <h3 class="question-title">有哪些方法可以避免社交网络中的信息过载问题？</h3>
                <div class="question-stats">
                    <span><i class="far fa-eye"></i> 986 浏览</span>
                    <span><i class="far fa-comment"></i> 29 回答</span>
                    <span><i class="far fa-heart"></i> 63 关注</span>
                </div>
            </div>

            <div class="question-item">
                <h3 class="question-title">如何处理社交网络中的负面评论和网络暴力？</h3>
                <div class="question-stats">
                    <span><i class="far fa-eye"></i> 3.1k 浏览</span>
                    <span><i class="far fa-comment"></i> 94 回答</span>
                    <span><i class="far fa-heart"></i> 215 关注</span>
                </div>
            </div>
        </div>
    </div>

    <!-- 近期活动模块 -->
    <div class="content-module">
        <div class="module-header">
            <h2 class="module-title"><i class="fas fa-calendar-alt"></i>近期活动</h2>
            <a href="#" class="view-all">查看全部 <i class="fas fa-angle-right"></i></a>
        </div>

        <div class="events-list">
            <div class="event-item">
                <div class="event-date">
                    <span class="event-month">六月</span>
                    <span class="event-day">15</span>
                </div>
                <div class="event-info">
                    <h3 class="event-title">2023社交网络创新峰会</h3>
                    <div class="event-location">
                        <i class="fas fa-map-marker-alt"></i>
                        <span>北京市朝阳区国际会议中心</span>
                    </div>
                </div>
            </div>

            <div class="event-item">
                <div class="event-date">
                    <span class="event-month">六月</span>
                    <span class="event-day">18</span>
                </div>
                <div class="event-info">
                    <h3 class="event-title">青年社交创业交流会</h3>
                    <div class="event-location">
                        <i class="fas fa-map-marker-alt"></i>
                        <span>上海市徐汇区创业孵化中心</span>
                    </div>
                </div>
            </div>

            <div class="event-item">
                <div class="event-date">
                    <span class="event-month">六月</span>
                    <span class="event-day">22</span>
                </div>
                <div class="event-info">
                    <h3 class="event-title">社交媒体营销实战工作坊</h3>
                    <div class="event-location">
                        <i class="fas fa-map-marker-alt"></i>
                        <span>线上直播</span>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 热门投票模块 -->
    <div class="content-module">
        <div class="module-header">
            <h2 class="module-title"><i class="fas fa-vote-yea"></i>热门投票</h2>
            <a href="#" class="view-all">查看全部 <i class="fas fa-angle-right"></i></a>
        </div>

        <div class="polls-list">
            <div class="poll-item">
                <h3 class="poll-question">你每天花多少时间在社交网络上？</h3>
                <div class="poll-options">
                    <div class="poll-option">
                        <label class="poll-option-label">
                            <input type="radio" name="poll1"> 少于1小时
                        </label>
                        <div class="progress-container">
                            <div class="progress-bar" style="width: 15%;"></div>
                        </div>
                    </div>
                    <div class="poll-option">
                        <label class="poll-option-label">
                            <input type="radio" name="poll1"> 1-3小时
                        </label>
                        <div class="progress-container">
                            <div class="progress-bar" style="width: 45%;"></div>
                        </div>
                    </div>
                    <div class="poll-option">
                        <label class="poll-option-label">
                            <input type="radio" name="poll1"> 3-5小时
                        </label>
                        <div class="progress-container">
                            <div class="progress-bar" style="width: 30%;"></div>
                        </div>
                    </div>
                    <div class="poll-option">
                        <label class="poll-option-label">
                            <input type="radio" name="poll1"> 5小时以上
                        </label>
                        <div class="progress-container">
                            <div class="progress-bar" style="width: 10%;"></div>
                        </div>
                    </div>
                </div>
                <div class="poll-votes">已有 1,258 人参与投票</div>
                <button class="vote-btn">投票</button>
            </div>

            <div class="poll-item">
                <h3 class="poll-question">你最常用的社交功能是什么？</h3>
                <div class="poll-options">
                    <div class="poll-option">
                        <label class="poll-option-label">
                            <input type="radio" name="poll2"> 发布动态
                        </label>
                        <div class="progress-container">
                            <div class="progress-bar" style="width: 25%;"></div>
                        </div>
                    </div>
                    <div class="poll-option">
                        <label class="poll-option-label">
                            <input type="radio" name="poll2"> 浏览资讯
                        </label>
                        <div class="progress-container">
                            <div class="progress-bar" style="width: 40%;"></div>
                        </div>
                    </div>
                    <div class="poll-option">
                        <label class="poll-option-label">
                            <input type="radio" name="poll2"> 聊天互动
                        </label>
                        <div class="progress-container">
                            <div class="progress-bar" style="width: 30%;"></div>
                        </div>
                    </div>
                    <div class="poll-option">
                        <label class="poll-option-label">
                            <input type="radio" name="poll2"> 其他功能
                        </label>
                        <div class="progress-container">
                            <div class="progress-bar" style="width: 5%;"></div>
                        </div>
                    </div>
                </div>
                <div class="poll-votes">已有 986 人参与投票</div>
                <button class="vote-btn">投票</button>
            </div>
        </div>
    </div>

    <!-- 星座速览模块 -->
    <div class="content-module">
        <div class="module-header">
            <h2 class="module-title"><i class="fas fa-star"></i>星座速览</h2>
            <a href="#" class="view-all">查看全部 <i class="fas fa-angle-right"></i></a>
        </div>

        <div class="horoscope-grid">
            <div class="horoscope-item">
                <div class="horoscope-icon">
                    <i class="fas fa-bull"></i>
                </div>
                <div class="horoscope-name">白羊座</div>
                <div class="horoscope-rating">
                    <i class="fas fa-star rating-star"></i>
                    <i class="fas fa-star rating-star"></i>
                    <i class="fas fa-star rating-star"></i>
                    <i class="fas fa-star rating-star"></i>
                    <i class="far fa-star rating-star empty"></i>
                </div>
            </div>

            <div class="horoscope-item">
                <div class="horoscope-icon">
                    <i class="fas fa-bullseye"></i>
                </div>
                <div class="horoscope-name">金牛座</div>
                <div class="horoscope-rating">
                    <i class="fas fa-star rating-star"></i>
                    <i class="fas fa-star rating-star"></i>
                    <i class="fas fa-star rating-star"></i>
                    <i class="far fa-star rating-star empty"></i>
                    <i class="far fa-star rating-star empty"></i>
                </div>
            </div>

            <div class="horoscope-item">
                <div class="horoscope-icon">
                    <i class="fas fa-twin"></i>
                </div>
                <div class="horoscope-name">双子座</div>
                <div class="horoscope-rating">
                    <i class="fas fa-star rating-star"></i>
                    <i class="fas fa-star rating-star"></i>
                    <i class="fas fa-star rating-star"></i>
                    <i class="fas fa-star rating-star"></i>
                    <i class="fas fa-star rating-star"></i>
                </div>
            </div>

            <div class="horoscope-item">
                <div class="horoscope-icon">
                    <i class="fas fa-crab"></i>
                </div>
                <div class="horoscope-name">巨蟹座</div>
                <div class="horoscope-rating">
                    <i class="fas fa-star rating-star"></i>
                    <i class="fas fa-star rating-star"></i>
                    <i class="fas fa-star rating-star"></i>
                    <i class="fas fa-star rating-star"></i>
                    <i class="far fa-star rating-star empty"></i>
                </div>
            </div>

            <div class="horoscope-item">
                <div class="horoscope-icon">
                    <i class="fas fa-sun"></i>
                </div>
                <div class="horoscope-name">狮子座</div>
                <div class="horoscope-rating">
                    <i class="fas fa-star rating-star"></i>
                    <i class="fas fa-star rating-star"></i>
                    <i class="fas fa-star rating-star"></i>
                    <i class="far fa-star rating-star empty"></i>
                    <i class="far fa-star rating-star empty"></i>
                </div>
            </div>

            <div class="horoscope-item">
                <div class="horoscope-icon">
                    <i class="fas fa-balance-scale"></i>
                </div>
                <div class="horoscope-name">天秤座</div>
                <div class="horoscope-rating">
                    <i class="fas fa-star rating-star"></i>
                    <i class="fas fa-star rating-star"></i>
                    <i class="fas fa-star rating-star"></i>
                    <i class="fas fa-star rating-star"></i>
                    <i class="far fa-star rating-star empty"></i>
                </div>
            </div>
        </div>
    </div>
</div>


<script>
	document.addEventListener('DOMContentLoaded', function () {
		// 为所有内容项添加点击事件
		const clickableItems = document.querySelectorAll(
			'.article-item, .question-item, .event-item, .horoscope-item'
		);

		clickableItems.forEach(item => {
			item.addEventListener('click', function () {
				// 获取标题文本
				let titleText = '';
				if (this.querySelector('.article-title')) {
					titleText = this.querySelector('.article-title').textContent;
				} else if (this.querySelector('.question-title')) {
					titleText = this.querySelector('.question-title').textContent;
				} else if (this.querySelector('.event-title')) {
					titleText = this.querySelector('.event-title').textContent;
				} else if (this.querySelector('.horoscope-name')) {
					titleText = this.querySelector('.horoscope-name').textContent + ' 运势';
				}

				console.log(`查看: ${titleText}`);

				// 添加点击动画
				this.style.transform = 'scale(0.98)';
				setTimeout(() => {
					this.style.transform = 'scale(1)';
				}, 150);
			});
		});

		// 投票按钮点击事件
		const voteButtons = document.querySelectorAll('.vote-btn');
		voteButtons.forEach(button => {
			button.addEventListener('click', function (e) {
				e.stopPropagation(); // 防止触发父元素事件

				const pollItem = this.closest('.poll-item');
				const selectedOption = pollItem.querySelector('input[type="radio"]:checked');

				if (selectedOption) {
					alert('投票成功！');
					// 实际应用中这里会发送投票数据到服务器
				} else {
					alert('请先选择一个选项');
				}
			});
		});

		// 页面滚动动画
		const animateOnScroll = () => {
			const modules = document.querySelectorAll('.content-module');
			modules.forEach(module => {
				const moduleTop = module.getBoundingClientRect().top;
				const triggerBottom = window.innerHeight * 0.8;

				if (moduleTop < triggerBottom) {
					module.style.opacity = '1';
					module.style.transform = 'translateY(0)';
				}
			});
		};

		// 初始化模块样式
		const modules = document.querySelectorAll('.content-module');
		modules.forEach((module, index) => {
			module.style.opacity = '0';
			module.style.transform = 'translateY(20px)';
			module.style.transition = `opacity 0.5s ease ${index * 0.1}s, transform 0.5s ease ${index * 0.1}s`;
		});

		// 初始加载和滚动时触发动画
		window.addEventListener('load', animateOnScroll);
		window.addEventListener('scroll', animateOnScroll);
	});
</script>

    